package com.example.kafka.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;

/**
 * @application:
 * @author: LiYuhang
 * @Date: 2021/6/26 15:15
 * @version: 0.1
 * @Description :
 * @Modified By:
 */
public interface MessageUtil {
    public static   String generatorUuid() {
        String uuid = UUID.randomUUID().toString();
        uuid = uuid.replace("-","");
        String id = uuid + "-" + new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date());
        return id.toUpperCase();
    }
}
